package com.yqg.education.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yqg.education.entity.DTO.AttachmentDTO;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * stage 实体类
 *
 * @author 张芸博
 * @since 2025-04-10
 */
@Getter
@Setter
public class Stage implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 培训期编号
     */
    private String stageNum;

    /**
     * 培训管理人员ID
     */
    private Long userId;

    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime endTime;

    /**
     * 一期一档流程 0准备；1进行中；2结束
     */
    private Integer flow;

    /**
     * 改进措施
     */
    private String improvMeasure;

    /**
     * 管理人员培训心得
     */
    private String trainExperience;

    /**
     * 是否删除
     */
    private Integer isDelete;
    /**
     * 用户名
     */
    @TableField(exist = false)
    private String username;

    /**
     * 附件
     */
    @TableField(exist = false)
    private List<AttachmentDTO> attachment;

}
